package com.talkingdata.hadoop.guard.bean;

public class YarnClusterState {
    private int id;                            // 编号
    private String clusterId;                  // 集群namespace 名称
    private int appsSubmitted;                 // 提交的任务
    private int appsCompleted;                 // 完成的任务
    private int appsFailed;                    // 失败的任务
    private Long availableMb;                  // 可用资源MB
    private String availableByteDesc;          // 可用资源 字符串格式
    private Long allocatedMb;                  // 已用资源MB
    private String allocatedByteDesc;          // 已用资源 字符串格式
    private Long totalMb;                      // 总内存资源
    private String totalByteDesc;              // 总内存资源 字符串格式
    private int totalVirtualCores;             // 总vcore
    private int totalNodes;                    // 计算节点
    private int lostNodes;                     // 丢失节点
    private int unhealthyNodes;                // 不健康节点
    private int decommissioningNodes;          // 在下架节点
    private int decommissionedNodes;           // 已下架节点
    private int activeNodes;                   // 活跃节点
    private int shutdownNodes;                 // 已关闭节点
    private String version ;                   // 版本
    private String timestamp;                  // 时间戳

    @Override
    public String toString() {
        return "YarnClusterState{" +
                "id=" + id +
                ", clusterId='" + clusterId + '\'' +
                ", appsSubmitted=" + appsSubmitted +
                ", appsCompleted=" + appsCompleted +
                ", appsFailed=" + appsFailed +
                ", availableMb=" + availableMb +
                ", availableByteDesc='" + availableByteDesc + '\'' +
                ", allocatedMb=" + allocatedMb +
                ", allocatedByteDesc='" + allocatedByteDesc + '\'' +
                ", totalMb=" + totalMb +
                ", totalByteDesc='" + totalByteDesc + '\'' +
                ", totalVirtualCores=" + totalVirtualCores +
                ", totalNodes=" + totalNodes +
                ", lostNodes=" + lostNodes +
                ", unhealthyNodes=" + unhealthyNodes +
                ", decommissioningNodes=" + decommissioningNodes +
                ", decommissionedNodes=" + decommissionedNodes +
                ", activeNodes=" + activeNodes +
                ", shutdownNodes=" + shutdownNodes +
                ", version='" + version + '\'' +
                ", timestamp='" + timestamp + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getClusterId() {
        return clusterId;
    }

    public void setClusterId(String clusterId) {
        this.clusterId = clusterId;
    }

    public int getAppsSubmitted() {
        return appsSubmitted;
    }

    public void setAppsSubmitted(int appsSubmitted) {
        this.appsSubmitted = appsSubmitted;
    }

    public int getAppsCompleted() {
        return appsCompleted;
    }

    public void setAppsCompleted(int appsCompleted) {
        this.appsCompleted = appsCompleted;
    }

    public int getAppsFailed() {
        return appsFailed;
    }

    public void setAppsFailed(int appsFailed) {
        this.appsFailed = appsFailed;
    }

    public Long getAvailableMb() {
        return availableMb;
    }

    public void setAvailableMb(Long availableMb) {
        this.availableMb = availableMb;
    }

    public String getAvailableByteDesc() {
        return availableByteDesc;
    }

    public void setAvailableByteDesc(String availableByteDesc) {
        this.availableByteDesc = availableByteDesc;
    }

    public Long getAllocatedMb() {
        return allocatedMb;
    }

    public void setAllocatedMb(Long allocatedMb) {
        this.allocatedMb = allocatedMb;
    }

    public String getAllocatedByteDesc() {
        return allocatedByteDesc;
    }

    public void setAllocatedByteDesc(String allocatedByteDesc) {
        this.allocatedByteDesc = allocatedByteDesc;
    }

    public Long getTotalMb() {
        return totalMb;
    }

    public void setTotalMb(Long totalMb) {
        this.totalMb = totalMb;
    }

    public String getTotalByteDesc() {
        return totalByteDesc;
    }

    public void setTotalByteDesc(String totalByteDesc) {
        this.totalByteDesc = totalByteDesc;
    }

    public int getTotalVirtualCores() {
        return totalVirtualCores;
    }

    public void setTotalVirtualCores(int totalVirtualCores) {
        this.totalVirtualCores = totalVirtualCores;
    }

    public int getTotalNodes() {
        return totalNodes;
    }

    public void setTotalNodes(int totalNodes) {
        this.totalNodes = totalNodes;
    }

    public int getLostNodes() {
        return lostNodes;
    }

    public void setLostNodes(int lostNodes) {
        this.lostNodes = lostNodes;
    }

    public int getUnhealthyNodes() {
        return unhealthyNodes;
    }

    public void setUnhealthyNodes(int unhealthyNodes) {
        this.unhealthyNodes = unhealthyNodes;
    }

    public int getDecommissioningNodes() {
        return decommissioningNodes;
    }

    public void setDecommissioningNodes(int decommissioningNodes) {
        this.decommissioningNodes = decommissioningNodes;
    }

    public int getDecommissionedNodes() {
        return decommissionedNodes;
    }

    public void setDecommissionedNodes(int decommissionedNodes) {
        this.decommissionedNodes = decommissionedNodes;
    }

    public int getActiveNodes() {
        return activeNodes;
    }

    public void setActiveNodes(int activeNodes) {
        this.activeNodes = activeNodes;
    }

    public int getShutdownNodes() {
        return shutdownNodes;
    }

    public void setShutdownNodes(int shutdownNodes) {
        this.shutdownNodes = shutdownNodes;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public YarnClusterState(int id, String clusterId, int appsSubmitted, int appsCompleted, int appsFailed, Long availableMb, String availableByteDesc, Long allocatedMb, String allocatedByteDesc, Long totalMb, String totalByteDesc, int totalVirtualCores, int totalNodes, int lostNodes, int unhealthyNodes, int decommissioningNodes, int decommissionedNodes, int activeNodes, int shutdownNodes, String version, String timestamp) {
        this.id = id;
        this.clusterId = clusterId;
        this.appsSubmitted = appsSubmitted;
        this.appsCompleted = appsCompleted;
        this.appsFailed = appsFailed;
        this.availableMb = availableMb;
        this.availableByteDesc = availableByteDesc;
        this.allocatedMb = allocatedMb;
        this.allocatedByteDesc = allocatedByteDesc;
        this.totalMb = totalMb;
        this.totalByteDesc = totalByteDesc;
        this.totalVirtualCores = totalVirtualCores;
        this.totalNodes = totalNodes;
        this.lostNodes = lostNodes;
        this.unhealthyNodes = unhealthyNodes;
        this.decommissioningNodes = decommissioningNodes;
        this.decommissionedNodes = decommissionedNodes;
        this.activeNodes = activeNodes;
        this.shutdownNodes = shutdownNodes;
        this.version = version;
        this.timestamp = timestamp;
    }

    public YarnClusterState() {
    }
}
